<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     default_iphone
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * Top menu for store
 *
 * @see Mage_Catalog_Block_Navigation
 */
?>
<script type="text/javascript">
//<![CDATA[
	function validatePollAnswerIsSelected()
	{
	    var options = $$('input.poll_vote');
	    for( i in options ) {
	        if( options[i].checked == true ) {
	            return true;
	        }
	    }
	    return false;
	}
//]]>
</script>
      <div class="column3">
          <a class="banner_col3 banner_col3_first" href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner2.png"/></a>
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner3.png"/></a>
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner4.png"/></a>
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner5.png"/></a>
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner6.png"/></a>
           <div id="h_wi_fb" class="h_calendar_events h_wi_fb h_wi_bgbg" >
            <div class="clearfloat" style="height:7px;"></div>
         <div class="h_calendar_events_container">
               <div  class="h_calendar_events_container_t">      
                   <div class="h_c_e_nav h_feature  witter" onclick="changeEvents2(this,1,3)">
                      <div class="h_c_e_nav_w"><img src="<?php echo $this->getSkinUrl()?>images/h_wi_fb_witter_button.png" /></div>
                    </div>
                   <div class="h_c_e_nav h_wh_on facebook" onclick="changeEvents2(this,2,3)">
                      <div class="h_c_e_nav_w"> <img src="<?php echo $this->getSkinUrl()?>images/h_wi_fb_facebook_button.png" relpath="<?php echo $this->getSkinUrl()?>images" /></div>
                   </div>
                   <div class="h_c_e_nav h_venues blog" onclick="changeEvents2(this,3,3)">
                         <div class="h_c_e_nav_w"> <img src="<?php echo $this->getSkinUrl()?>images/h_wi_fb_blog_button.png"/></div>
                   </div>                            
                   <div class="clearfloat"></div>
               </div>

               
             
            <div  class="h_calendar_events_container_m_out">   
               <div  class="h_calendar_events_container_m" style="background:none">       
                     <div class="h_c_e_container_m_con" id="ha_c_e_container_m_con_1">
                                    
<!--                                    <script src="http://widgets.twimg.com/j/2/widget.js"></script>-->
<!--									<script>-->
<!--									new TWTR.Widget({-->
<!--									  version: 2,-->
<!--									  type: 'profile',-->
<!--									  rpp: 10,-->
<!--									  interval: 6000,-->
<!--									  width: 268,-->
<!--									  height: 156,-->
<!--									  theme: {-->
<!--									    shell: {-->
<!--									      background: '#c2ecff',-->
<!--									      color: '#3b3b3b'-->
<!--									    },-->
<!--									    tweets: {-->
<!--									      background: '#ffffff',-->
<!--									      color: '#7a7a7a',-->
<!--									      links: '#00b0bd'-->
<!--									    }-->
<!--									  },-->
<!--									  features: {-->
<!--									    scrollbar: true,-->
<!--									    loop: false,-->
<!--									    live: false,-->
<!--									    hashtags: true,-->
<!--									    timestamp: true,-->
<!--									    avatars: true,-->
<!--									    behavior: 'all'-->
<!--									  }-->
<!--									}).render().setUser('DoncasterDome').start();-->
<!--									</script>-->
<!--                          <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="DoncasterDome">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>                                                               -->
                     </div>           
                     
                      <div class="h_c_e_container_m_con" id="ha_c_e_container_m_con_2" style="display:none">
<!--                            <iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FDoncaster-Dome-Leisure-Centre%2F22403065636&amp;width=268&amp;colorscheme=light&amp;show_faces=false&amp;stream=true&amp;header=false&amp;height=395" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:268px; height:395px;" allowTransparency="true"></iframe>                                                                  -->
                     </div>   
                       <div class="h_c_e_container_m_con" id="ha_c_e_container_m_con_3"  style="display:none">
                           blog                                                                
                     </div>                           
               </div>    
            </div>
                      
         </div> 
           <div  class="h_wi_twitter_logo">     
                   <img src="<?php echo $this->getSkinUrl()?>images/h_wi_twitter_logo.png"/>
          </div>
          <div  class="h_calendar_events_container_b">     
                    Content updated: 23/03/2011  10:25 
          </div>
         
   </div>
<div class="h_poll_module">
               <div class="h_poll_title">
                  <div>DAILY POLL</div>
                 </div>
               <?php $pollId= Mage::getSingleton('core/session')->getJustVotedPoll();
               if (empty($pollId)):?>
               <div class="h_poll_info_show" id="h_pooll_1" style="display:block;">
                   <div>
                   <?php $poll= Mage::getModel('poll/poll')->load(2);?>
                   <?php echo $poll->getPollTitle() ?>
                   </div>
               </div>
               <div class="h_poll_radios" id="h_pooll_2" style="display:block;">
               	   <form id="pollForm" action="<?php echo $this->getUrl()?>poll/vote/add/poll_id/2/" method="post" onsubmit="return validatePollAnswerIsSelected();">
                   <div class="radios">
                        <?php $answers = Mage::getModel('poll/poll_answer')->getCollection()
           					->addFieldToFilter('poll_id',array('in'=>$poll->getPollId() )); ?>
           				<?php $key=1; foreach ($answers as $answer):?>
                       <span class="r<?php echo $key?>"><input class="radio poll_vote" name="vote" id="vote_<?php echo $answer->getId() ?>" type="radio" value="<?php echo $answer->getAnswerId() ?>" />
                       <?php echo $answer->getAnswerTitle()?></span>
                       <?php $key++; endforeach;?>                     
                   </div>
                   <div class="tijiao"><input type="submit" value="&nbsp;"/></div>
                   </form>
               </div>   
               <?php else:?>  
               <div class="h_poll_pop_bg" id="h_pooll_3" style="display:block;">
                     <div class="h_poll_pop_con" >
                         <div style="font-size:11px; font-family:Verdana, Geneva, sans-serif; color:#ffffff; font-weight:normal;">Thank you for voting, so far it's...</div>
                         <div>
                         <?php 
                         		$poll = Mage::getModel('poll/poll')->load($pollId);
                                 $pollAnswers = Mage::getModel('poll/poll_answer')
						            ->getResourceCollection()
						            ->addPollFilter($pollId)
						            ->load()
						            ->countPercent($poll);
                         ?>
                         <?php $key=1; foreach( $pollAnswers as $answer ): ?>
                         	<?php if ($key==1):?>
                             <span style=" color:#ccff00; font-size:16px; font-weight:bold; font-family:Arial, Helvetica, sans-serif; margin-right:6px;"><?php echo $answer->getPercent() ?>% <?php echo $this->htmlEscape($answer->getAnswerTitle()) ?></span>
                         	<?php elseif ($key==2):?>
                         	 <span style=" color:#ff5ca5; font-size:16px; font-weight:bold; font-family:Arial, Helvetica, sans-serif;margin-right:6px;"><?php echo $answer->getPercent() ?>% <?php echo $this->htmlEscape($answer->getAnswerTitle()) ?></span>
                         	<?php elseif ($key==3):?>
                         	<span  style=" color:#b591b8; font-size:16px; font-weight:bold; font-family:Arial, Helvetica, sans-serif;"><?php echo $answer->getPercent() ?>% <?php echo $this->htmlEscape($answer->getAnswerTitle()) ?></span>
                         	<?php endif;?>
                         	<?php $key++; endforeach;?>
                         </div>
                         <div style="font-size:11px; font-family:Verdana, Geneva, sans-serif; color:#ffffff; font-weight:normal; color:#b591b8;">Check back soon for another poll</div>    
                     
                     </div>                                      
               </div>       
               <?php endif;?>                  
      </div>
      
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner7.png"/></a>
          <a class="banner_col3"  href="#"><img src="<?php echo $this->getSkinUrl()?>images/banner8.png"/></a>
       </div>
